package com.aliang.docker.controller;

import com.aliang.docker.entity.ClassiFication;
import com.aliang.docker.entity.User;
import com.aliang.docker.mapper.ClassiFicationMapper;
import com.aliang.docker.mapper.UserMapper;
import com.aliang.docker.service.ClassiFicationService;
import com.aliang.docker.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;

@Api(tags = "用户信息管理")
@RestController
@RequestMapping("/userRecord")
public class UserRecordController  {
  @Autowired
  UserMapper userMapper;

  /**
   * 服务对象
   */
  @ApiOperation("分页查询所有数据")
  @GetMapping("/page")
  public R selectAll() {
    List<User> userList = userMapper.selectList(null);
    userList.forEach(System.out::println);
    HashMap<String, Object> map = new HashMap<>();
    map.put("code", 200);
    map.put("data", userList);
    return R.ok(map);
  }



}